export default {
  name: 'search',
  namespaced: true,
  state: {
    historyRecord: true,
    searchContent: ['华为']
  },
  getters: {
    searchContent (state) {
      return state.searchContent;
    },
    historyRecord(state) {
      return state.historyRecord;
    }
  },
  mutations: {
    RmSearchContent(state) {
       state.searchContent = [];
    },
    PushSearchContent(state, value) {
      if (state.searchContent.indexOf(value) === -1) {
        state.searchContent.unshift(value);
      }
      state.historyRecord = true;
    },
     IshistoryRecord(state) {
       state.historyRecord = false;
    },
  }
}
